﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GnufExtension.h"

namespace gcmp
{
    class ElementId;
    class IUiDocument;
    class IUiView;
    class IUiViewParent;
    class IModelView;
    class IDocument;
}

namespace gnuf
{
    class GNUF_EXTENSION_EXPORT GnufUiDocUtils
    {
    public:
        static  gcmp::IUiView* GetCurrentUIView();
        static  gcmp::IUiDocument* GetCurrentUIDoc();
        static  gcmp::IModelView* GetCurrentModelView();
        static  gcmp::IDocument* GetCurrentDocument();
        static gcmp::IUiView* CreateUiView(
            const gcmp::IUiDocument* pUIDoc, 
            const gcmp::ElementId& viewId, 
            const std::wstring& uiViewTag, 
            gcmp::IUiViewParent* pViewParent,
            bool bEnableRenderPatchCombine
        );
        static void UpdateView(gcmp::IUiDocument* pUIDoc, bool isRebuild = false);
    };
}
